package com.corpgovernment.costcenter.vo;

import com.corpgovernment.api.costcenter.model.OrgInfo;
import com.corpgovernment.api.supplier.valid.Base;
import com.corpgovernment.api.supplier.valid.Extra;
import com.corpgovernment.common.base.BaseRequestVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
public class ProjectInfoVo extends BaseRequestVO {

    @NotNull(message = "项目ID不能为空", groups = {Extra.class})
    private Integer id;

    @NotBlank(message = "项目所属公司不能为空", groups = {Base.class, Extra.class})
    private String company;

    @NotBlank(message = "项目所属公司id不能为空", groups = {Base.class, Extra.class})
    private String companyId;

    @NotBlank(message = "项目编码不能为空", groups = {Base.class, Extra.class})
    private String projectCode;

    @NotBlank(message = "项目名称不能为空", groups = {Base.class, Extra.class})
    private String projectName;

    private String projectLeader;

    private String operatorUid;

    private String operatorName;

    @NotNull(message = "项目状态不能为空", groups = {Base.class, Extra.class})
    private Boolean valid;

//    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
//    private Date createTime;
//
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    @NotNull(message = "项目对应的部门不能为空", groups = {Base.class, Extra.class})
    private List<OrgInfo> departments;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date validStartDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date validEndDate;
}
